1. Field of the Invention
The present invention relates generally to the field of image processing, and more particularly, to the conversion of a template image.
2. Description of the Related Art
Different applications require image processing in different formats. Generally, an image in a Joint Photographic Experts Group (JPEG) format, or other formats, is processed by decoding the image into a raw data format (e.g., a Red Green Blue (RGB), YUV, or Hue, Saturation and Value (HSV) color space) based on an application type. Different raw data formats have different characteristics and different affects may occur when a component of the raw data format undergoes a change.
RGB components associated with each pixel of an image in the RGB format are highly correlated. Specifically, if an R component associated with a pixel is modified, characteristics, such as color and brightness, of the associated pixel are modified. On the contrary, HSV is an uncorrelated domain, where H represents a color component. Specifically, changing the H component only changes the color, while S and V, which represent saturation component and brightness components, respectively, remain unchanged. Similarly in the YUV format, changing the Y component only changes the intensity associated with pixel while color remains intact.
Image-processing devices are provided with an application, such as, for example, an Image Merging application, which enables a preview frame to be displayed in one or more predefined regions of a template image. Such applications require conversion of the template image from a base format to another format for ease of processing. For example, the base format of the predefined region may be a RGB/YUV format and it may be desirable to convert the base format of the predefined region into an HSV format for ease of processing, or vice versa. However, since raw data in the RGB format is highly correlated, extraction of hue information from the raw data in the RGB format is achieved through RGB to HSV conversion, resulting in a non-linear operation. As a consequence, the conversion of the RGB format raw data in the predefined region of the template image into an HSV format may significantly affect performance and requires a long processing time since the conversion operation is non-linear one.